<template>
    <div id="app">
        <router-view/>
    </div>
</template>
<script>
    import {mapState} from "vuex";

    export default {
        data() {
            return {
            }
        },
        computed: {
            ...mapState(['theme'])
        },
        watch: {
            theme(val) {
                let dom = document.getElementById('app')
                dom.style.backgroundColor = val
            },
        }
    }
</script>
<style lang="scss">
    #app {
        font-family: miranafont, Hiragino Sans GB, STXihei, Microsoft YaHei, SimSun, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        color: #2c3e50;
        box-sizing: border-box;
        width: 100%;
        height: 100vh;
    }

    #nav {
        padding: 30px;

        a {
            font-weight: bold;
            color: #2c3e50;

            &.router-link-exact-active {
                color: #42b983;
            }
        }
    }
</style>
